-
-
Notifications
You must be signed in to change notification settings - Fork 189
feat: add descendantsAreTraversable parameter to useFocusNode #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new boolean parameter, Changes
Sequence Diagram(s)sequenceDiagram
participant Widget
participant useFocusNode
participant _FocusNodeHook
participant FocusNode
Widget->>useFocusNode: Call with descendantsAreTraversable
useFocusNode->>_FocusNodeHook: Pass descendantsAreTraversable
_FocusNodeHook->>FocusNode: Construct with descendantsAreTraversable
Note right of FocusNode: descendantsAreTraversable set
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (8)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
LGTM thanks! |
Summary
Adds support for the
descendantsAreTraversableparameter touseFocusNodehook to match Flutter'sFocusNodeconstructor.Context
Flutter added the
descendantsAreTraversableparameter toFocusNodeto control whether descendants of this focus node can be traversed by the focus system. This parameter was missing from theuseFocusNodehook, preventing users from accessing this functionality through flutter_hooks.Changes
descendantsAreTraversableparameter touseFocusNodefunction with default valuetrue_FocusNodeHookclass to handle the new parameter_FocusNodeHookStateto properly initialize and update the parameterTesting
FocusNodeFocusNodeconstructorBackward Compatibility
Fully backward compatible - existing code will continue to work unchanged as the new parameter has a default value of
truematching Flutter's behavior.References
Summary by CodeRabbit